namespace Crux.Core.LangChain.Abstractions.Splitters.Code;

/// <summary>
/// 
/// </summary>
public readonly struct CodePart(
    string name,
    string content,
    CodePartType type = CodePartType.Unknown)
{
    /// <summary>
    /// 
    /// </summary>
    public readonly string Name { get; } = name;
    /// <summary>
    /// 
    /// </summary>
    public readonly string Content { get; } = content;
    /// <summary>
    ///  
    /// </summary>
    public readonly CodePartType Type { get; } = type;
    /// <summary>
    /// Represents an empty document part.
    /// </summary>
    public static CodePart Empty { get; } = new(
        name: string.Empty,
        content: string.Empty,
        type: CodePartType.Unknown);
}